<?php
echo "<div align=\"center\">";
echo "<table border='1'>";
?>
<tr class="lichy">
    <th>Kdo</th>
    <td>Pěcha</td>
    <td>Obrněný</td>
    <td>Tanky</td>
    <td>Stihy</td>
    <td>Vrtule</td>
    <td>Kasárny</td>
</tr>
<?php
$i = 0;
$vysledek_cena = mysql_query("SELECT * FROM ceny");
while ($zaznam = mysql_fetch_array($vysledek_cena)) {
    $i++;
    echo $i;
    if (($i % 2) != 0) {
        $barva = "lichy";
    } else {
        $barva = "sudy";
    }
?>
    <tr class="<? $barva ?>">
        <th><?php echo $zaznam["kdo"]; ?></th>
        <td><?php echo $zaznam["pecha"]; ?></td>
        <td><?php echo $zaznam["obr"]; ?></td>
        <td><?php echo $zaznam["tank"]; ?></td>
        <td><?php echo $zaznam["stihy"]; ?></td>
        <td><?php echo $zaznam["vrtule"]; ?></td>
        <td><?php echo $zaznam["kasarny"]; ?></td>
    </tr> <?php
}
echo "</table><br><br><table border='1'>";

$vysledek_cena = mysql_query("SELECT * FROM ip ORDER BY id DESC");
while ($zaznam = mysql_fetch_array($vysledek_cena)) {
 ?>
    <tr>
        <td><?php echo $zaznam["id"]; ?></td>
        <td><?php echo $zaznam["kdo"]; ?></td>
        <td><?php echo $zaznam["kdy"]; ?></td>
        <td><?php echo $zaznam["ip"]; ?></td>
    </tr> <?php
}
echo "</table></div>";
?>
